package com.kate.quickstart.pojo;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@Component
@ConfigurationProperties(prefix = "book")
public class Book {
//    @Value("${book.name}")
    private String name;
//    @Value("${book.author}")
    private String author;
//    @Value("${book.price}")
    private Float price;

    public void setName(String name){
        this.name = name;
    }
}
